#include "StdAfx.h"
#include "TString.h"

LPCTSTR TString::c_str() const {
	return m_pstr;
}
string TString::GetString()
{
	return	W2A(m_pstr);
}
void TString::Add(string pstr) {
	wstring temp = A2W(pstr);
	__super::Append(temp.c_str());
}
TString::TString() {}
TString::TString(LPCTSTR _txt) :CDuiString(_txt) {}
TString::TString(string _txt)
{
	wstring temp = A2W(_txt);
	this->Empty();
	this->Append(temp.c_str());
}
TString::TString(const char* _txt)
{
	wstring temp = A2W(_txt);
	this->Empty();
	this->Append(temp.c_str());

}
TString::TString(CDuiString _txt) : CDuiString(_txt) {}
TString::TString(TString& _txt) {
	this->Append(_txt.GetData());
}

TString TString::operator+(const TString& a) {
	TString ot;
	ot.Append(this->GetData());
	ot.Append(a.GetData());
	return ot;
}
TString TString::operator+(const char* a) {
	TString ot;
	wstring temp = A2W(a);
	ot.Append(this->GetData());
	ot.Append(temp.c_str());
	return ot;
}